<!--test.vue-->
<template>
  <div :style="setStyle(defaultAttr)">
    <span v-html="defaultAttr.text"></span>
  </div>
</template>

<script>
  export default {
    name: 'ViewText',
    props: {
      defaultAttr: {
        type: Object,
        default: () => {
          return {
            text: '',
            textSize: '',
            textColor: '',
          }
        }
      }
    },
    data() {
      return {}
    },
    methods: {
      setStyle(attr) {
        const {textColor, textSize} = attr
        return {
          color: textColor,
          fontSize: textSize + 'px',
        }
      }
    }
  }
</script>

<style lang="scss" scoped>


</style>
